const webpack = require('webpack');

module.exports = {
    publicPath: process.env.NODE_ENV === 'production' ? 'https://cjlgb-design-developer.cdn.bcebos.com/' : '/',
    css :   {
        loaderOptions: {
            less: {
                javascriptEnabled: true
            }
        }
    },
    configureWebpack: {
        plugins: [
            //  忽略moment.js的所有区域设置文件
            new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
        ],
    },
    //  跨域配置
    devServer: {
        port : 80,
        host : 'open.cjlgb.com',
        //  关闭Host检查
        disableHostCheck: true,
        proxy: {
            '/apis': {
                target: 'http://cjlgb-design-gateway:10001',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    '^/apis': ''
                }
            }
        }
    }
};
